//
//  HBaseLiveController.h
//  linktuIOS
//
//  Created by hejunsong on 2017/2/5.
//  Copyright © 2017年 tianxie. All rights reserved.
//

#import <UIKit/UIKit.h>
//view
#import "HLiveProfileView.h"
#import "HLivegoldView.h"
#import "OnAirTimeView.h"
#import "HLiveTopAudienceView.h"
#import "HLiveMessageView.h"
#import "HLiveLeftAudienceView.h"
#import "Masonry.h"
#import "HLiveShareView.h"
#import "HLiveInputView.h"
#import "IQKeyboardManager.h"
#import "SendGiftView.h"
#import "HReplayProgressView.h"
#import "MTLiveFunctionView.h"
#import "MTLiveProfileView.h"

#import <PLRTCStreamingKit/PLRTCStreamingKit.h>
#import <PLPlayerKit/PLPlayerKit.h>
//#import "PersonDetail.h"
//#import "PersonalDetailForHost.h"
#import "HLiveToolView.h"
#import "HLiveSendGiftView.h"
#import "BulletView.h"
#import "StopLiveView.h"
#import "HLiveLightView.h"
#import "HLiveFinishView.h"
#import "HLiveScrollView.h"
#import "MTBeautifySetView.h"
#import "MTCreateLiveView.h"

//manger
#import "BulletManager.h"
#import "HHugeAnimationManger.h"

#import "MTLiveModel.h"

//#import "PLMediaStreamingKit.h"

typedef NS_ENUM(NSInteger,  LiveControllertype) {
    
    LiveControllertypeAudience, //观众端
    LiveControllertypeLive,    //主播端
    LiveControllertypeReplay,  //回放端
    
    
};
@class PersonDetail;

@interface HBaseLiveController : UIViewController


//创建直播参数
@property(nonatomic,strong) NSDictionary *createRoomDict;


@property(nonatomic,strong) MTLiveModel *livemodel;
@property(nonatomic,strong) MTLiveModel *toplivemodel;
@property(nonatomic,strong) MTLiveModel *bottomlivemodel;

//看直播参数
@property(nonatomic,strong) NSString *roomid;
//看直播聊天室ID
@property(nonatomic,strong) NSString *chatRoomid;
@property(nonatomic,strong) NSString *pullurl;
@property(nonatomic,assign) BOOL allowSlideSwitch;  //设置是否可以滑动切换
@property(nonatomic,strong) NSString *topImageUrl;
@property(nonatomic,strong) NSString *bottomImageUrl;
@property(nonatomic,strong) NSString *currentImageUrl;



@property(nonatomic,strong) UIView  *mainView;
@property(nonatomic,strong) UIView  *leftView;

@property(nonatomic,strong) HLiveScrollView *mainScrollView;

@property(nonatomic,strong) UIView *contentView;



@property(nonatomic,strong) HLiveProfileView *anchorprofileView;

@property(nonatomic,strong) HLivegoldView   *goldView;

@property(nonatomic,strong) HLiveTopAudienceView *topAudicenceView;

@property(nonatomic,strong) HLiveMessageView *messageView;

@property(nonatomic,strong) UILabel *livetitleLable;

@property(nonatomic,strong) HLiveToolView *toolView;



@property(nonatomic,strong) UIView *gameAndGiftContentView;

@property(nonatomic,strong) UIButton *fllowingAnchorButton;

@property(nonatomic,strong) UIButton *closeButton;

@property(nonatomic,strong) UIButton *gamehelpButton;
@property(nonatomic,assign) BOOL     isshowGameAndGiftView;

@property(nonatomic,strong) UIButton *closeFullScreenButton;

@property(nonatomic,strong) UIButton *closegameButton;


@property(nonatomic,strong) HLiveProfileView *leftanchorprofileView;

@property(nonatomic,strong) HLiveLeftAudienceView *leftAudicenceView;
@property(nonatomic,strong) UIButton   *addressButton;



@property(nonatomic,assign) BOOL IsTopgesture;

@property(nonatomic,strong) UIPanGestureRecognizer *panGesture;

//@property(nonatomic,strong) MTShareView *shareView;

@property(nonatomic,strong) MTLiveFunctionView *functionView;
@property(nonatomic,strong) MTBeautifySetView *beautifySetView;

//展示不动
//@property(nonatomic,strong) LTShareView *ltshareView;

@property(nonatomic,strong) HLiveInputView *inputView;

@property(nonatomic,strong) HLiveSendGiftView *giftView;

@property(nonatomic,strong) PersonDetail *personDetail;

//@property(nonatomic,strong) PersonalDetailForHost *personDetailForhost;

@property(nonatomic,strong)  MTLiveProfileView *userDetailView;

@property(nonatomic,strong) SendGiftView *sendgiftView;

@property(nonatomic,strong) SendGiftView *sendgiftView1;

@property(nonatomic,strong) HReplayProgressView *replayProgressView;
@property(nonatomic,assign) NSInteger timeShowOut;
@property(nonatomic,assign) BOOL  isDragProgressView;


@property(nonatomic,strong) StopLiveView *livestopView;

@property(nonatomic,strong) HLiveFinishView *finishView;

@property(nonatomic,strong) HLiveLightView *lightNumberView;

@property(nonatomic,strong) OnAirTimeView *hostOnAirView;



@property(nonatomic,strong) MTCreateLiveView *createLiveView;



//manger
@property(nonatomic,strong) BulletManager  *bulletManager;
@property(nonatomic,strong) HHugeAnimationManger *hugeAimationManger;


@property (nonatomic,assign) LiveControllertype conteollerType;


//推流参数设置
@property (nonatomic,strong)  NSArray<PLVideoCaptureConfiguration *>     *videoCaptureConfigurations;
@property (nonatomic,strong)  NSArray<PLVideoStreamingConfiguration *>   *videoStreamingConfigurations;

//直播填充模式
@property(nonatomic,assign) UIViewContentMode livecontentMode;

@property (nonatomic, strong) UIImageView *currentImageView;

@property(nonatomic,strong) NSString *AnchorUserid; //主播userid

@property(nonatomic,assign) BOOL  isGameLive;



-(instancetype)initWithType:(LiveControllertype)type;


//视频加载与停止动画
-(void)startAnimation;
-(void)stopAnimation;


-(void)replayUI;
-(void)anchorUI;
-(void)aduienceGameUI;
-(void)aduienceUI;


-(void)FllowingAnchor;
-(void)judgeFollowhost;  //判断是否关注主播
-(void)CloseRoomClick:(UIButton *)but;
-(void)CloseFullScreenClick:(UIButton *)but;
-(void)LightClick;       //子类实现点亮动画

-(void)setDelegate;      //view  在子类中设置代理

-(void)lightenAnimation; //点亮动画

-(void)adminWarning;     //被设为管理员alterView的提示
-(void)blackListWarning; //被设为黑名单alterView的提示
-(void)allDirection;     //允许横屏


-(void)failedWarning:(NSString *)warningString withInfo:(NSString *)info; //网络请求错误的alterView的提示
-(void)SwitchLiveClick:(UIPanGestureRecognizer *)gesture;                 //切换房间 在子类中实现

-(void)hiddenWhenisAudite;

-(void)reoladCover;




@end
